package com.czp.infosharingplatformapp.repository;

import com.czp.infosharingplatformapp.model.UserPostRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserPostRecordRepository extends JpaRepository<UserPostRecord, Long> {
    List<UserPostRecord> findByUserId(Long userId); // 查找用户的所有浏览记录
    boolean existsByUserIdAndPostId(Long userId, Long postId); // 检查某个用户是否已浏览某个帖子
}